package com.excel.entity;

import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.format.DateTimeFormat;
import com.alibaba.excel.annotation.format.NumberFormat;
import com.alibaba.excel.converters.string.StringImageConverter;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.joda.time.DateTime;
import org.springframework.stereotype.Component;

import java.io.Serializable;
import java.util.Date;


/**
 * ClassName:DemoData
 * Package:com.excel.entity
 * Description
 *
 * @Author:@wenxueshi
 * @Create:2023/7/9 - 15:06
 * @Version:v1.0
 */
@Data
@EqualsAndHashCode
@Component
public class DemoData{
    @ExcelProperty(value = "字符串标题",index = 0)
    private String title;

    @ExcelProperty(value = "日期标题",index = 1)
    private String dateTime;

    @NumberFormat("#.##%")
    @ExcelProperty(value = "数字标题",index = 2)
    private Double doubleData;
    /**
     * 忽略这个字段
     */
    @ExcelIgnore
    private String ignore;
}
